Conventionally, there are game devices in which a player object can be caused to move or change its direction based on an input operation performed by a player using a direction input section. For example, there is a game in which the player object is caused to move forward and backward by moving a stick in up and down directions, and to rotate by moving the stick in left and right directions. In such a game, an orientation and a position of the player object are changed based on a player's input.
However, in conventional games, a player's input is directly used to control the orientation and position of a player object, and the player object cannot be necessarily easily caused to correctly perform a motion which is intended by the player.
An object of an exemplary embodiment is to provide a game system, game processing method, game program, and game device in which a player object can be easily caused to correctly perform a motion which is intended by a player.
In order to achieve the object, the present exemplary embodiment has a configuration as follows.
An exemplary embodiment is a game system for controlling a player object provided in a virtual world based on input data representing an input operation performed by a player using an input device. The game system includes an input data obtaining section, a setting section, an adjustment section, and an attitude changing section. The input data obtaining section obtains the input data. The setting section sets, based on the input data, control data representing a direction and amount of a change in an orientation of the player object in the virtual world. The adjustment section adjusts the control data so that when the player object and a predetermined other object have a predetermined position relationship, the player object is easily caused to face in a predetermined direction. The attitude changing section changes an attitude of the player object based on the control data.
With the above configuration, the control data representing the change direction and change amount of the orientation of the player object is set based on the input data. When the player object and the predetermined other object have the predetermined position relationship, the control data can be adjusted so that the player object is easily caused to face in the predetermined direction. As a result, when the player object and the predetermined other object have the predetermined position relationship, the player object can be easily caused to face in the predetermined direction.
In another configuration, the adjustment section may adjust the control data so that the player object is easily caused to face the other object.
With the above configuration, the player object can be easily caused to face the other object.
In another configuration, the adjustment section may adjust the control data so that when the other object is located behind the player object, the player object is easily caused to face the other object.
With the above configuration, when the other object is located behind the player object, the player object can be easily caused to face the other object.
In another configuration, the game system may further include a degree calculation section configured to calculate a degree of a match between a specific direction as viewed from the player object and a direction from the player object toward the other object. The adjustment section may adjust the control data based on the degree.
With the above configuration, the control data can be adjusted based on the degree. For example, the degree may increase as the other object is closer to a position directly behind the player object. Alternatively, the degree may increase as the other object is closer to a position directly to the right of the player object.
In another configuration, the degree may increase as the other object is closer to a position directly behind the player object. In this case, the adjustment section may adjust the control data so that the player object is more easily caused to face the other object as the degree increases.
With the above configuration, as the other object is closer to a position directly behind the player object, the player object can be more easily caused to face the other object.
In another configuration, the input data may include attitude data based on the attitude of the input device. The game system may further include an attitude obtaining section configured to obtain the attitude of the input device based on the attitude data. The setting section may set the control data based on the attitude of the input device.
With the above configuration, the attitude of the input device can be obtained, and the control data can be set based on the attitude of the input device.
In another configuration, the setting section may set the control data so that the orientation of the player object is changed by a first change amount corresponding to a change amount of the attitude of the input device. In this case, the adjustment section may adjust the control data so that when the player object and the other object have the predetermined position relationship, the orientation of the player object is changed by a second change amount larger than the first change amount.
With the above configuration, the orientation of the player object can be changed based on the first change amount corresponding to the change amount of the attitude of the input device. When the player object and the other object have the predetermined position relationship, the orientation of the player object can be changed by a larger amount.
In another configuration, the setting section may set the control data so that the orientation of the player object is changed toward a direction in the virtual world corresponding to a direction in which the attitude of the input device has been changed, by the first change amount corresponding to the change amount of the attitude of the input device. The adjustment section may adjust the control data so that when the direction in the virtual world corresponding to the direction in which the attitude of the input device has been changed is a direction in which the player object faces the other object, the orientation of the player object is changed by the second change amount larger than the first change amount.
With the above configuration, the orientation of the player object can be changed based on the change direction and change amount of the attitude of the input device. When the attitude of the input device is changed toward the direction in which the player object faces the other object, the orientation of the player object can be changed by a larger amount.
In another configuration, the input data may include direction data corresponding to an input operation performed on a direction input section included in the input device. The setting section may set the control data based on the direction data.
With the above configuration, the control data can be set based on an input operation performed on the direction input section.
In another configuration, the game system may further include a movement section configured to cause the player object to move in the virtual world based on the direction data.
With the above configuration, the player object can be caused to move in the virtual world based on an input operation performed on the direction input section.
In another configuration, when the player object and the other object have the predetermined position relationship, then if a movement direction of the player object represented by the direction data is a direction in which the player object faces the other object, the movement section may limit a movement of the player object. The adjustment section may adjust the control data so that when the player object and the other object have the predetermined position relationship, then if the movement direction of the player object represented by the direction data is a direction in which the player object faces the other object, the player object is caused to face the other object.
With the above configuration, the player object can be caused to move based on an input operation performed on the direction input section. When the player object and the other object have the predetermined position relationship, then if the movement direction represented by the direction data is a direction in which the player object faces the other object, the movement of the player object can be limited. In this case, the control data can be adjusted so that the player object faces the other object.
In another configuration, the input device may be a portable display device including a display section. The game system may further include a virtual camera setting section and a display control section. The virtual camera setting section sets a virtual camera in the virtual world based on the orientation of the player object. The display control section causes the display section to display an image of the virtual world captured by the virtual camera.
With the above configuration, a virtual camera can be set based on the orientation of the player object, and an image of the virtual space captured by the virtual camera can be displayed on the portable display device.
In another configuration, the other object may be an enemy object which is allowed to move in the virtual world. The game system may further include an attack control section configured to cause the player object to attack the enemy object based on the input data.
With the above configuration, a game can be provided in which a player object is caused to attack an enemy object.
Another exemplary embodiment may be a game device included in the game system. Still another exemplary embodiment may be in the form of a game program which causes a computer included in the game system to function each of the above sections. Still another exemplary embodiment may be in the form of a game processing method which is performed in the game device or the game system. The game system may be implemented by a plurality of devices which cooperate with each other or a single device.
According to the present exemplary embodiment, a player can cause a player object to correctly perform a motion which is intended by the player.
These and other objects, features, aspects and advantages of the present exemplary embodiment will become more apparent from the following detailed description of the present exemplary embodiment when taken in conjunction with the accompanying drawings.